#define  _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;

template<class T1,class T2>
void Swap(T1& left, T2& right)
{
	T tmp = left;
	left = right;
	right = tmp;
}

int main()
{
	double x1 = 1.1;
	double x2 = 1.2;
	Swap(x1, x2);

	int s1 = 1;
	int s2 = 2;
	Swap(s1, s2);
	return 0;
}